package com.mbl.base.modular.member.service.impl;

import com.mbl.base.modular.mall.vo.UserVo;
import com.mbl.base.modular.member.entity.User;
import com.mbl.base.modular.member.mapper.UserMapper;
import com.mbl.base.modular.member.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author lwj
 * @since 2020-03-05
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Override
    public UserVo findUserVoById(Long userId) {
        User user = getById(userId);
        UserVo userVo = new UserVo();
        userVo.setNickname(user.getNickName());
        userVo.setAvatar(user.getAvatar());
        return userVo;
    }
}
